package pwd.allen.mapper;

import org.apache.ibatis.annotations.Insert;
import pwd.allen.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

@Repository
public interface UserMapper extends BaseMapper<User> {

    @Select("select * from t_user where user_id=#{userId}")
    User selectByUserId(Long userId);


    @Insert("insert into t_user(user_id,username,ustatus) select #{userId},#{username},#{ustatus} from dual")
    int insertTest(User user);
}
